package com.hbshtx.api.sfb.resp;

/***
 * 服务器返回基础数据
 * 
 * @author Administrator
 * 
 */
public class BaseResp {
	
	public int pageCount; // 总页数
	public int count; // 总条数
	// 错误码
	public final static int SUCCESS = 0;
	public final static int SYSTEM_ERROR = 1;
	/***
	 * 错误时返回描述信息
	 */
	public String message;

	/***
	 * 错误码 成功为0,错误为其他
	 */
	public int requestCode = 0;
	
	/**
	 * 错误返回
	 */
	public BaseResp setMessage(String message){
		this.requestCode = SYSTEM_ERROR;
		this.message = message;
		return this;
	}
	
	/**
	 * 成功返回
	 */
	public BaseResp setSuccess(String message){
		this.requestCode = SUCCESS;
		this.message = message;
		return this;
	}
}
